package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TPatrolHouseAssetsAttachMapper;
import com.ruoyi.system.domain.TPatrolHouseAssetsAttach;
import com.ruoyi.system.service.ITPatrolHouseAssetsAttachService;
import com.ruoyi.common.core.text.Convert;

/**
 * 房产资产巡查附件信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-08
 */
@Service
public class TPatrolHouseAssetsAttachServiceImpl implements ITPatrolHouseAssetsAttachService 
{
    @Autowired
    private TPatrolHouseAssetsAttachMapper tPatrolHouseAssetsAttachMapper;

    /**
     * 查询房产资产巡查附件信息
     * 
     * @param id 房产资产巡查附件信息主键
     * @return 房产资产巡查附件信息
     */
    @Override
    public TPatrolHouseAssetsAttach selectTPatrolHouseAssetsAttachById(Long id)
    {
        return tPatrolHouseAssetsAttachMapper.selectTPatrolHouseAssetsAttachById(id);
    }

    /**
     * 查询房产资产巡查附件信息列表
     * 
     * @param tPatrolHouseAssetsAttach 房产资产巡查附件信息
     * @return 房产资产巡查附件信息
     */
    @Override
    public List<TPatrolHouseAssetsAttach> selectTPatrolHouseAssetsAttachList(TPatrolHouseAssetsAttach tPatrolHouseAssetsAttach)
    {
        return tPatrolHouseAssetsAttachMapper.selectTPatrolHouseAssetsAttachList(tPatrolHouseAssetsAttach);
    }

    /**
     * 新增房产资产巡查附件信息
     * 
     * @param tPatrolHouseAssetsAttach 房产资产巡查附件信息
     * @return 结果
     */
    @Override
    public int insertTPatrolHouseAssetsAttach(TPatrolHouseAssetsAttach tPatrolHouseAssetsAttach)
    {
        tPatrolHouseAssetsAttach.setCreateTime(DateUtils.getNowDate());
        return tPatrolHouseAssetsAttachMapper.insertTPatrolHouseAssetsAttach(tPatrolHouseAssetsAttach);
    }

    /**
     * 修改房产资产巡查附件信息
     * 
     * @param tPatrolHouseAssetsAttach 房产资产巡查附件信息
     * @return 结果
     */
    @Override
    public int updateTPatrolHouseAssetsAttach(TPatrolHouseAssetsAttach tPatrolHouseAssetsAttach)
    {
        tPatrolHouseAssetsAttach.setUpdateTime(DateUtils.getNowDate());
        return tPatrolHouseAssetsAttachMapper.updateTPatrolHouseAssetsAttach(tPatrolHouseAssetsAttach);
    }

    /**
     * 批量删除房产资产巡查附件信息
     * 
     * @param ids 需要删除的房产资产巡查附件信息主键
     * @return 结果
     */
    @Override
    public int deleteTPatrolHouseAssetsAttachByIds(String ids)
    {
        return tPatrolHouseAssetsAttachMapper.deleteTPatrolHouseAssetsAttachByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除房产资产巡查附件信息信息
     * 
     * @param id 房产资产巡查附件信息主键
     * @return 结果
     */
    @Override
    public int deleteTPatrolHouseAssetsAttachById(Long id)
    {
        return tPatrolHouseAssetsAttachMapper.deleteTPatrolHouseAssetsAttachById(id);
    }
}
